BIN=mycode
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
CC=gcc
RM=rm -f

$(BIN): $(OBJ)
	$(CC) $^ -o $@

%.o: %.c
	$(CC) -c $<  -g

.PHONY: clean test

clean:
	$(RM) $(OBJ) $(BIN)
	@echo "清理完成"

test:
	@echo "可执行文件: $(BIN)"
	@echo "源文件: $(SRC)"
	@echo "目标文件: $(OBJ)"
